package com.aabte.hystrixlearn.hystrix.config;

import com.aabte.hystrixlearn.hystrix.HystrixRequestContextFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Daniel
 */
@Configuration
public class MainConfig {

    @Bean
    public FilterRegistrationBean filterRegistrationBean() {
        FilterRegistrationBean bean = new FilterRegistrationBean();
        bean.setFilter(new HystrixRequestContextFilter());
        bean.addUrlPatterns("/");
        return bean;
    }

}
